Release 10.1A: OpenEdge Getting Started:
Progress OpenEdge Studio
Advanced editing features in OpenEdge Studio
If your OpenEdge Studio installation runs under a development license, you have access to the following advanced editing features:
- Color coding — Also called color syntax-highlighting, color coding is a powerful feature in which the editor displays various types of 4GL syntax elements such as keywords, comments, and character strings in distinct colors.
For example, all keywords might appear in blue. Color coding makes it easy to understand the syntax and structure of a 4GL program. You can customize the color coding used for language elements and/or change their style, for example, to apply a bold or italic typeface.
Color coding is supported for the Progress 4GL and for many other programming and scripting languages, including HTML, C/C++, Perl, and Java.
- Embedded color coding — Embedded color coding recognizes multiple languages in the same file and can display them with their own color-coding schemes. Using embedded color coding simplifies editing source files that contain code in multiple languages: the editor displays each language’s code using a distinct color-coding scheme and all other language-specific features.
By default, the editors recognize only embedded SpeedScript, JavaScript, VBScript, and/or Java in HTML files.
- Syntax expansion — Syntax expansion occurs when you type a 4GL keyword, statement, or block structure and then press the SPACEBAR. The editor expands the syntax of the keyword or other language element by inserting a template specific to it.
- Alias expansion — Alias expansion allows you to define shortcuts that extend or modify syntax expansion in the editors. You can use the aliases to insert more complete code and syntax templates when you type the shortcut and press the SPACEBAR.
For example, when you type in DISP, then press the SPACEBAR, the editor does not expand this syntax by default. However, you can use alias expansion to define a code template to insert more of the statement’s syntax. Then when you type DISP and press the SPACEBAR, the editor expands to the template you defined.
OpenEdge provides a number of default aliases. These aliases are in the file
p4gl.alslocated in your working editor configuration directory. By default, this is thePROEDITdirectory in your OpenEdge working directory. Whenever you use the Alias Editor dialog box to modify or add aliases for Progress 4GL source files, the editor saves the changes to thep4gl.alsfile.- Syntax indenting — Syntax indenting in the editors occurs when you press the ENTER key at the end of a block statement. The editor inserts a new line and indents the cursor relative to the block statement.
For example, if you create a Progress 4GL source file with the cursor positioned at the end of a line that contains the
DOkeyword, and you press the ENTER key, the editor inserts a new line and indents the cursor relative to theDOkeyword.- SmartPaste — The SmartPaste feature allows you to paste lines of text into a Progress 4GL source file and indent them relative to the surrounding code. This feature saves coding time by making it unnecessary to indent pasted code manually. It is especially useful when you copy and paste code among several source files.
For example, if you select several lines of code in a source file, copy them to the clipboard using CTRL-C, then paste them inside a
FORblock using CTRL-V, the editors use SmartPaste to indent the pasted lines correctly relative to the indentation level of theFORloop.For more information about the advanced editing features, see the OpenEdge Development: AppBuilder and the Procedure Window and Common Dialog help system.
Now that you are familiar with the Desktop and the AppBuilder main window, you are ready to learn more about developing applications using the tools and SmartObject technology. To help you learn, this guide introduces the SportsPro sample application, which was designed to highlight these features.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |